package com.qys.livesMall.shop.utils;

import java.util.Random;

/**
 * @menu BusinessNoUtil
 * @date 2023/06/07 14:29
 */
public class BusinessNoUtil {

    public static String get(String businessPrefix,Integer shopCode){
        return businessPrefix+shopCode.toString()+randomString(7);
    }

    public static String randomString(int len) {
        String AB ="0123456789";
        Random rnd = new Random();
        StringBuilder sb = new StringBuilder(len);
        for (int i = 0; i < len; i++) {
            sb.append(AB.charAt(rnd.nextInt(AB.length())));
        }
        return sb.toString();
    }
}

